import pytest
import json
with open('data.json','r',encoding='utf-8') as f:
    a=json.load(f)
    name=a['name']
    graduate=a['graduate']
assert name=='小明' and graduate=='清华大学'
class Testpd:
    def test_name(self):
        n=name
        assert  n=='小明'
    def test_graduat(self):
        g=graduate
        assert g=='清华大学'
if __name__ == '__main__':
    pytest.main(['-s','bb.py'])
